<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>红绿灯</title>
</head>
<body>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .parent{
            width: 350px;
            height: 950px;
            background-color: gray;
            /* 给父元素设置padding */
            padding: 50px;
            box-sizing: border-box;
        }
        .parent .r{
            width: 250px;
            height: 250px;
            border-radius: 50%;
            background-color: red;
            
            /* margin-top: 50px; */
            
            box-sizing: border-box;
            
            /*margin-bottom: 50px; */
            
            /* margin: 50px auto; */
        }
        .parent .g{
            width: 250px;
            height: 250px;
            border-radius: 50%;
            background-color: green;
            
            margin-top: 50px;
           
            box-sizing: border-box;
            
            
            /* margin: 50px auto; */

        }
        .parent .y{
            width: 250px;
            height: 250px;
            border-radius: 50%;
            background-color: yellow;
            
            
            margin-top: 50px;
            

            box-sizing: border-box;
            /* margin-bottom: 50px; */
            
            /* margin: 50px auto; */

        }
    </style>
    <div class="parent">
        <div class="r"></div>
        <div class="g"></div>
        <div class="y"></div>
    </div>

    
</body>
</html>